﻿namespace Mp3Observer.Interfaces
{
    using System;
    using Mp3Observer.Model;

    /// <summary>
    /// Contract definition for a file search.
    /// </summary>
    public interface IFileSearch
    {
        /// <summary>
        /// Occurs when [file found].
        /// </summary>
        event EventHandler<FileEventArgs> FileFound;

        /// <summary>
        /// Occurs when [directory found].
        /// </summary>
        event EventHandler<FileEventArgs> DirectoryFound;

        /// <summary>
        /// Gets or sets a value indicating whether this instance is running.
        /// </summary>
        /// <value>
        ///     <c>true</c> if this instance is running; otherwise, <c>false</c>.
        /// </value>
        bool IsRunning { get; set; }

        /// <summary>
        /// Gets the media files.
        /// </summary>
        /// <param name="path">The path to search.</param>
        void GetMediaFiles(string path);

        /// <summary>
        /// Cancels the search.
        /// </summary>
        void Cancel();
    }
}
